package com.demo.service.impl;

import com.demo.dao.ClassDao;
import com.demo.dao.StudentDao;
import com.demo.dao.impl.ClassDaoImpl;
import com.demo.dao.impl.StudentDaoImpl;
import com.demo.entity.Class;
import com.demo.entity.Student;
import com.demo.service.ClassService;
import com.demo.service.StudentService;

import java.io.Serializable;
import java.util.Map;

public class ClassServiceImpl implements ClassService {

    @Override
    public void add(Class vo) {
        //你看这个对象是哪个
        ClassDao classDao = new ClassDaoImpl();
        classDao.add(vo);
    }

    @Override
    public void delete(long classId) {
        ClassDao classDao = new ClassDaoImpl();

        classDao.delete(classId);

    }

    @Override
    public void update(Class vo) {
        ClassDao classDao = new ClassDaoImpl();

        classDao.update(vo);

    }

    @Override
    public Class get(Serializable classId) {
        ClassDao classDao = new ClassDaoImpl();
        return classDao.get(classId);
    }

    @Override
    public Map<String, Object> list(Map<String, Object> params) {
        ClassDao classDao = new ClassDaoImpl();
        return classDao.list(params);
    }
}